home *** CD-ROM | disk | FTP | other *** search
- import java.io.IOException;
- import javax.microedition.lcdui.Command;
- import javax.microedition.lcdui.CommandListener;
- import javax.microedition.lcdui.Display;
- import javax.microedition.lcdui.Displayable;
- import javax.microedition.lcdui.Form;
- import javax.microedition.lcdui.Image;
- import javax.microedition.lcdui.ImageItem;
- import javax.microedition.lcdui.StringItem;
- import javax.microedition.midlet.MIDlet;
-
- public class MaximaVolley extends MIDlet implements CommandListener {
- private static final int COLOR_WHITE = 16777215;
- private static final int COLOR_BLACK = 0;
- private int GAME_SPEED = 4;
- private MaximaVolley$GameFrame mainFrame = new MaximaVolley$GameFrame(this);
- private Form AboutScreen;
- private Form ResultScreen;
- private Form Splash = new Form("Maxima-Volley");
- private Command Back = new Command("Back", 4, 2);
- private Command About = new Command("About", 4, 2);
- private Command Done = new Command("Done", 4, 1);
- private Command Again = new Command("Again", 4, 2);
- private Command Exit = new Command("Exit", 4, 1);
- private long elapsedTime;
- private long time;
- public int rand;
- // $FF: renamed from: p1 int
- public int field_0;
- // $FF: renamed from: p2 int
- public int field_1;
- // $FF: renamed from: pr int
- public int field_2;
- public int gol;
- public int touch;
- public int touch1;
- private MaximaVolley$Ball myBall;
- private MaximaVolley$Player myPlayer;
- private MaximaVolley$Player myPlayer1;
- private boolean gameOver = true;
- private int numGames;
- private Display myDisplay = Display.getDisplay(this);
-
- public MaximaVolley() {
- try {
- this.Splash.append(new ImageItem((String)null, Image.createImage("/Voll.png"), 3, (String)null));
- } catch (IOException var2) {
- this.Splash.append("An application by NotTheFly Component Solutions");
- }
-
- this.Splash.addCommand(this.Done);
- this.Splash.addCommand(this.About);
- this.Splash.setCommandListener(this);
- this.AboutScreen = new Form("Maxima-Volley");
- this.AboutScreen.append(new StringItem((String)null, "The classic arcade game, now on your mobile device! Press 0 to exit!"));
- this.AboutScreen.addCommand(this.Back);
- this.AboutScreen.setCommandListener(this);
- this.ResultScreen = new Form("Results");
- this.ResultScreen.addCommand(this.Again);
- this.ResultScreen.addCommand(this.Exit);
- this.ResultScreen.setCommandListener(this);
- }
-
- protected void startApp() {
- this.myDisplay.setCurrent(this.Splash);
- }
-
- protected void pauseApp() {
- this.gameOver = true;
- this.myBall = null;
- this.myPlayer = null;
- this.myPlayer1 = null;
- }
-
- protected void destroyApp(boolean var1) {
- this.gameOver = true;
- }
-
- public void commandAction(Command var1, Displayable var2) {
- if (var1 == this.About) {
- Display.getDisplay(this).setCurrent(this.AboutScreen);
- }
-
- if (var1 == this.Back) {
- Display.getDisplay(this).setCurrent(this.Splash);
- }
-
- if (var1 == this.Exit) {
- this.destroyApp(false);
- ((MIDlet)this).notifyDestroyed();
- }
-
- if (var1 == this.Done || var1 == this.Again) {
- Display.getDisplay(this).setCurrent(this.mainFrame);
- this.field_0 = 0;
- this.field_1 = 0;
- this.field_2 = -1;
- this.touch = this.touch1 = 0;
- this.gameOver = false;
- this.myBall = new MaximaVolley$Ball(this);
- this.myPlayer = new MaximaVolley$Player(this);
- this.myPlayer1 = new MaximaVolley$Player(this);
- this.elapsedTime = System.currentTimeMillis();
- this.time = this.elapsedTime;
- this.myBall.setUp(1);
- this.myPlayer.setUp(1);
- this.myPlayer1.setUp(2);
- this.myBall.start();
- this.myPlayer.start();
- this.myPlayer1.start();
- }
-
- }
-
- // $FF: synthetic method
- static MaximaVolley$Player access$000(MaximaVolley var0) {
- return var0.myPlayer;
- }
-
- // $FF: synthetic method
- static MaximaVolley$GameFrame access$100(MaximaVolley var0) {
- return var0.mainFrame;
- }
-
- // $FF: synthetic method
- static MaximaVolley$Player access$200(MaximaVolley var0) {
- return var0.myPlayer1;
- }
-
- // $FF: synthetic method
- static MaximaVolley$Ball access$300(MaximaVolley var0) {
- return var0.myBall;
- }
-
- // $FF: synthetic method
- static boolean access$400(MaximaVolley var0) {
- return var0.gameOver;
- }
-
- // $FF: synthetic method
- static long access$502(MaximaVolley var0, long var1) {
- return var0.time = var1;
- }
-
- // $FF: synthetic method
- static int access$602(MaximaVolley var0, int var1) {
- return var0.GAME_SPEED = var1;
- }
-
- // $FF: synthetic method
- static boolean access$402(MaximaVolley var0, boolean var1) {
- return var0.gameOver = var1;
- }
-
- // $FF: synthetic method
- static int access$708(MaximaVolley var0) {
- return var0.numGames++;
- }
-
- // $FF: synthetic method
- static int access$700(MaximaVolley var0) {
- return var0.numGames;
- }
-
- // $FF: synthetic method
- static Form access$800(MaximaVolley var0) {
- return var0.ResultScreen;
- }
-
- // $FF: synthetic method
- static Display access$900(MaximaVolley var0) {
- return var0.myDisplay;
- }
-
- // $FF: synthetic method
- static int access$600(MaximaVolley var0) {
- return var0.GAME_SPEED;
- }
-
- // $FF: synthetic method
- static long access$500(MaximaVolley var0) {
- return var0.time;
- }
-
- // $FF: synthetic method
- static int access$608(MaximaVolley var0) {
- return var0.GAME_SPEED++;
- }
- }
-